﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FIM_MoneyReturnsOpen.aspx.cs" Inherits="KPIS.GERP.GFMS.APP.App_UI.Forms.FIM_MoneyReturnsOpen" %>
<%@ Register Src="~/App_UI/UserControls/DatePicker.ascx" TagPrefix="uc" TagName="DatePicker" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <script src="../Scripts/DatePicker.js"></script>
    <link href="../CssClass.css" rel="stylesheet" />
    <title>รายการทะเบียนคุมสัญญาเงินยืม</title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
    <div>
        <div class="TextHeaderSmall">
            กรองข้อมูลทะเบียนคุมสัญญาเงินยืม
            <br />
        </div>
        <table>
            <tr>
                <td style=" width:100px;">
                    ตั้งแต่วันที่ :
                </td>
                <td>
                    <uc:DatePicker runat="server" ID="txtFromDate" />
                </td>
                <td>
                    ถึงวันที่ :
                </td>
                <td>
                    <uc:DatePicker runat="server" ID="txtToDate" />
                </td>
            </tr>
            <tr>
                <td>

                </td>
                <td>
                    <div style="height:5px"></div>
                    <asp:Button ID="cmdFilter" runat="server" Text="กรองข้อมูล" OnClick="cmdFilter_Click" />
                </td>
            </tr>
        </table>
        <div style="height:10px"></div>
        <asp:Label ID="lblBankAccSeq" runat="server" Visible="false"></asp:Label>
   <asp:Panel ID="PanelView" runat="server">
        <telerik:RadGrid GroupingSettings-CaseSensitive="false" ID="grdHistory" runat="server" AutoGenerateColumns="false"
            AllowMultiRowEdit="false" AllowMultiRowSelection="false"
            ShowStatusBar="true" AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="true"
            Width="800px" Height="480px" Skin="Default"
            GroupingSettings-GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;"
            GroupingSettings-GroupContinuedFormatString=""
            GroupingSettings-GroupContinuesFormatString=""
            GroupingSettings-GroupSplitFormat="" OnItemCommand="grdHistory_ItemCommand">
            <MasterTableView AllowMultiColumnSorting="true" CellSpacing="-1" Width="100%"
                DataKeyNames="money_req_seq" NoMasterRecordsText="< ไม่มีข้อมูล >">
                <RowIndicatorColumn>
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <ExpandCollapseColumn>
                    <HeaderStyle Width="20px" />
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn DataField="money_req_seq"
                        UniqueName="money_req_seq" Visible="False">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="record_status" 
                        UniqueName="record_status" Visible="False">
                    </telerik:GridBoundColumn>
                
                    <telerik:GridBoundColumn DataField="borrow_no" HeaderText="เลขที่ใบยืม"
                        UniqueName="borrow_no" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                        CurrentFilterFunction="Contains" ShowFilterIcon="False">
                        <HeaderStyle Width="100px" HorizontalAlign="Left" />
                        <ItemStyle HorizontalAlign="Left" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="money_req_name" HeaderText="ชื่อรายการ"
                        UniqueName="money_req_name" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                        CurrentFilterFunction="Contains" ShowFilterIcon="False">
                        <%--<HeaderStyle Width="440px" HorizontalAlign="Left" />--%>
                        <ItemStyle HorizontalAlign="Left" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="borrow_return_date" HeaderText="วันที่ครบกำหนด"
                        UniqueName="borrow_return_date" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                        CurrentFilterFunction="Contains" ShowFilterIcon="False" DataFormatString="{0:d}">
                        <HeaderStyle Width="100px" HorizontalAlign="Left" />
                        <ItemStyle HorizontalAlign="Left" />
                    </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="debtor_emp_name" HeaderText="ผู้ยิม"
                        UniqueName="debtor_emp_name" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                        CurrentFilterFunction="Contains" ShowFilterIcon="False" DataFormatString="{0:n2}"
                        AllowFiltering="false">
                        <HeaderStyle Width="120px" HorizontalAlign="Right" />
                        <ItemStyle HorizontalAlign="Right" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="total_amount" HeaderText="จำนวนเงินยืม(บาท)"
                        UniqueName="total_amount" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                        CurrentFilterFunction="Contains" ShowFilterIcon="False" DataFormatString="{0:n2}"
                        AllowFiltering="false">
                        <HeaderStyle Width="120px" HorizontalAlign="Right" />
                        <ItemStyle HorizontalAlign="Right" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="return_amount" HeaderText="จำนวนเงินที่หักล้าง(บาท)"
                        UniqueName="return_amount" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                        CurrentFilterFunction="Contains" ShowFilterIcon="False" DataFormatString="{0:n2}"
                        AllowFiltering="false">
                        <HeaderStyle Width="120px" HorizontalAlign="Right" />
                        <ItemStyle HorizontalAlign="Right" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="receive_amount" HeaderText="จำนวนเงินที่คืน(บาท)"
                        UniqueName="receive_amount" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                        CurrentFilterFunction="Contains" ShowFilterIcon="False" DataFormatString="{0:n2}"
                        AllowFiltering="false">
                        <HeaderStyle Width="120px" HorizontalAlign="Right" />
                        <ItemStyle HorizontalAlign="Right" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="remarks" HeaderText="หมายเหตุ" Visible="false"
                        UniqueName="remarks" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                        CurrentFilterFunction="Contains" ShowFilterIcon="False">
                        <HeaderStyle Width="100px" HorizontalAlign="Left" />
                        <ItemStyle HorizontalAlign="Left" />
                    </telerik:GridBoundColumn>
                </Columns>
                 <PagerStyle Mode="NumericPages" AlwaysVisible="true" 
                    FirstPageToolTip="กลับหน้าแรก" LastPageToolTip="ไปหน้าสุดท้าย" 
                    NextPagesToolTip="หน้าถัดไป" NextPageToolTip="หน้าถัดไป" 
                    PrevPagesToolTip="ย้อนกลับ" PrevPageToolTip="ย้อนกลับ" />
            </MasterTableView>
            <GroupingSettings GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;" 
                GroupContinuedFormatString="" GroupContinuesFormatString="" 
                GroupSplitFormat="" />
            <ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="true">
                <Selecting AllowRowSelect="true" />
                <Scrolling AllowScroll="true" UseStaticHeaders="true" />
            </ClientSettings>
        </telerik:RadGrid>
      </asp:Panel>
    </div>
    </form>
</body>
</html>
